class BinaryTree{
    static class TreeNode{
        public String val;
        public TreeNode left;
        public TreeNode right;

        public TreeNode(String val) {
            this.val = val;
        }
    }
    public TreeNode create(){
        TreeNode A=new TreeNode("A");
        TreeNode B=new TreeNode("B");
        TreeNode C=new TreeNode("C");
        TreeNode D=new TreeNode("D");
        TreeNode E=new TreeNode("E");
        TreeNode F=new TreeNode("F");
        TreeNode G=new TreeNode("G");
        TreeNode H=new TreeNode("H");
        A.left=B;
        A.right=C;
        B.left=D;
        B.right=E;
        E.right=H;
        C.left=F;
        C.right=G;
           return A;
    }
    public void preOrder(TreeNode root) {
    if(root==null){
        return;
    }
        System.out.print(root.val+" ");
        preOrder(root.left);
        preOrder(root.right);

    }
    public void inOrder(TreeNode root) {

    }
    public void postOrder(TreeNode root) {

    }
}
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
      BinaryTree.TreeNode treeNode= binaryTree.create();
        System.out.println(treeNode.val);
        binaryTree.preOrder(treeNode);
    }
}
